<template>
  <div>
<h2>当前求和为:{{sum}}</h2>
    <h4>和放大100倍是:{{bigSum}}</h4>
    <button @click="INCREMENT(number)">加2</button>
  </div>
</template>

<script>
import {mapGetters, mapMutations, mapState} from "vuex";

export default {
  name: 'App',
  data(){
    return{
      number:2
    }
  },
  computed:{
...mapState(['sum']),
    ...mapGetters(['bigSum'])
  },
  methods:{
    ...mapMutations(['INCREMENT'])
  }
}
</script>

<style scoped>

</style>